package ca.qc.bdeb.info.pp2.tp2.application;

import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;

public class CodePostalDAO
{
    public static List<CodePostal> listerCodePostal(int idQuartier)
    {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        Query query = session.createQuery("from CodePostal where id_quartier=" + idQuartier);
        return (List<CodePostal>) (query.list());
    }
}
